<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>刮刮乐活动编辑</title>
<link href="${base}/resource/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resource/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resource/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/resource/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resource/admin/js/input.js"></script>
<style type="text/css">
.authorities label {
	min-width: 120px;
	_width: 120px;
	display: block;
	float: left;
	padding-right: 4px;
	_white-space: nowrap;
}
</style>
<script type="text/javascript">
$().ready(function() {

	var $inputForm = $("#inputForm");
	var $selectAll = $("#inputForm .selectAll");

    var $browserButton = $("#browserButton");
    $browserButton.browser();
    var $browserButton = $("#shopbrowserButton");
    $browserButton.browser();

	
	[@flash_message /]
	
	$selectAll.click(function() {
		var $this = $(this);
		var $thisCheckbox = $this.closest("tr").find(":checkbox");
		if ($thisCheckbox.filter(":checked").size() > 0) {
			$thisCheckbox.prop("checked", false);
		} else {
			$thisCheckbox.prop("checked", true);
		}
		return false;
	});
	
	// 表单验证
	$inputForm.validate({
		rules: {
			name: "required",
			authorities: "required"
		}
	});
	
});
</script>
</head>
<body>
	<div class="path">
		<a href="${base}/admin/main.do">首页</a> &raquo; 刮刮乐活动编辑
	</div>
	<form id="inputForm" action="update.do" method="post">
		<input type="hidden" name="id" value="${entity.id}" />
        <input type="hidden" name="gglhdid" value="${entity.gglhdid}" />

		<table class="input">
            <tr>
                <th>
                    <span class="requiredField">*</span>奖品类型:
                </th>
                <td>
                    <input type="text" name="name" class="text" value="${entity.name}" maxlength="200" required="required"/>
                </td>
            </tr>

            <tr>
                <th>
                    <span class="requiredField">*</span>奖品说明:
                </th>
                <td>
                    <input type="text" name="jp" class="text" value="${entity.jp}" maxlength="200" required="required"/>
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>奖品数量:
                </th>
                <td>
                    <input type="text" name="num" class="text" value="${entity.num}" maxlength="200" required="required"/>
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>奖品库存:
                </th>
                <td>
                    <input type="text" name="kc" class="text" value="${entity.kc}" maxlength="200" required="required"/>
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>中奖概率:
                </th>
                <td>
                    <input type="text" name="gl" class="text" value="${entity.gl}" maxlength="200" required="required"/>
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>奖品图片:
                </th>
                <td>
                <span class="fieldSet">
						<input type="text" id="imgPath" name="imgPath" class="text valid"  maxlength="200" value="${entity.imgPath}" required="required">
						<input type="button" id="browserButton" class="button" value="选择文件">
					</span>
                    <span class="requiredField">* 上传284px,147px大小图片</span>:
                </td>
            </tr>
            <tr>
                <th>
                    <span class="requiredField">*</span>商品图片:
                </th>
                <td>
                <span class="fieldSet">
						<input type="text" id="shopPath" name="shopPath" class="text valid"  maxlength="200"  value="${entity.shopPath}" required="required">
						<input type="button" id="shopbrowserButton" class="button" value="选择文件">
					</span>
                    <span class="requiredField">* 上传400px,400px大小图片</span>:
                </td>

            </tr>
            <tr>
				<th>
					&nbsp;
				</th>
				<td>
					<input type="submit" class="button" value="提交" />
					<input type="button" class="button" value="返回" onclick="location.href='list.do?Id=${entity.gglhdid}'" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>